package com.scut.chenlujie.library.clink.sample.server;

import com.scut.chenlujie.library.clink.box.StringReceivePacket;
import com.scut.chenlujie.library.clink.sample.foo.handle.ConnectorStringPacketChain;
import com.scut.chenlujie.library.clink.sample.foo.handle.ConnectorHandler;

public class ServerStatistics {
     long sendSize;
     long receiveSize;

     ConnectorStringPacketChain staticsChain(){
         return new StatisticsConnectorStringPacketChain();
     }

     class StatisticsConnectorStringPacketChain extends ConnectorStringPacketChain{

         @Override
         protected boolean consume(ConnectorHandler handler, StringReceivePacket stringReceivePacket) {
             //接收数据自增 但不消费
             receiveSize++;
             return false;
         }
     }
}
